package com.killer.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.killer.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author killer
 * @since 2021-11-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_order")
@ApiModel(value="Order对象", description="订单表")
public class Order extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数量合计")
    @TableField("total_num")
    private Integer totalNum;

    @ApiModelProperty(value = "金额合计")
    @TableField("total_money")
    private Integer totalMoney;

    @ApiModelProperty(value = "优惠金额")
    @TableField("pre_money")
    private Integer preMoney;

    @ApiModelProperty(value = "邮费")
    @TableField("post_fee")
    private Integer postFee;

    @ApiModelProperty(value = "实付金额")
    @TableField("pay_money")
    private Integer payMoney;

    @ApiModelProperty(value = "支付类型，1、在线支付、0 货到付款")
    @TableField("pay_type")
    private Integer payType;

    @ApiModelProperty(value = "付款时间")
    @TableField("pay_time")
    private Date payTime;

    @ApiModelProperty(value = "发货时间")
    @TableField("consign_time")
    private Date consignTime;

    @ApiModelProperty(value = "交易完成时间")
    @TableField("end_time")
    private Date endTime;

    @ApiModelProperty(value = "交易关闭时间")
    @TableField("close_time")
    private Date closeTime;

    @ApiModelProperty(value = "物流名称")
    @TableField("shipping_name")
    private String shippingName;

    @ApiModelProperty(value = "物流单号")
    @TableField("shipping_code")
    private String shippingCode;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "买家留言")
    @TableField("buyer_message")
    private String buyerMessage;

    @ApiModelProperty(value = "是否评价")
    @TableField("buyer_rate")
    private Boolean buyerRate;

    @ApiModelProperty(value = "收货人")
    @TableField("receiver_contact")
    private String receiverContact;

    @ApiModelProperty(value = "收货人手机")
    @TableField("receiver_mobile")
    private String receiverMobile;

    @ApiModelProperty(value = "收货人地址")
    @TableField("receiver_address")
    private String receiverAddress;

    @ApiModelProperty(value = "订单来源：1:web，2：app，3：微信公众号，4：微信小程序  5 H5手机页面")
    @TableField("source_type")
    private Integer sourceType;

    @ApiModelProperty(value = "交易流水号")
    @TableField("transaction_id")
    private String transactionId;

    @ApiModelProperty(value = "订单状态")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "支付状态")
    @TableField("pay_status")
    private Integer payStatus;

    @ApiModelProperty(value = "发货状态")
    @TableField("consign_status")
    private Integer consignStatus;


}
